-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add local directory support #101
Conversation
Co-authored-by: Jeff Widman <[email protected]>
Co-authored-by: Jeff Widman <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, it makes a ton of sense.
I'm 👍🏻 on --local
as the flag as we don't really have any other context other than local-dir
right now, running against a local-host
( e.g. GHES? ) seems way out of scope and I think it can be achieved via the job definition if we needed to in a pinch.
# Conflicts: # cmd/dependabot/internal/cmd/update.go # cmd/dependabot/internal/cmd/update_test.go
This adds the ability to copy a local directory into the updater to be used as the repository to be updated. The file fetcher will prefer to use the locally cloned repository and won't hit GitHub to fetch the files.
Copying in the directory has certain workflow advantages:
Previously we tried using
-v
to mount the directory but this didn't work very well:git reset
between dependency updates.-v "$(pwd):/home/dependabot/dependabot-updater/repo:ro"
The flag I chose for now is
--local
, but if you have a better idea let me know. The terms "directory", "repo", "path" are overloaded already so it was difficult to find a new term.